package day0722;

import java.util.Arrays;

public class Test10 {
    public static void main(String[] args) {
        int[]  a={0,0,0,0,0};//1.
        a[0]=1;//2.
        a[1]=2;
        a[2]=3;
        a[3]=4;
        a[4]=5;
        int i=0;
        while(i<a.length){//3.
            System.out.print(a[i] +" ");
            i++;
        }//4.System.arraycopy();
        //a={1,2,3,4,5}
        //{5,2,3,4,5}
        System.arraycopy(a,4, a,0,1);
        System.out.println(Arrays.toString(a));
    }
}
